package day05;
import java.util.Scanner;
public class Addition1 {
    public static void main(String[] args) {
        Scanner scan =new Scanner(System.in);
        int aa = 0;//分数
        for(int i =1;i<=10;i++){
        int a =(int)(Math.random()*100);
        int b =(int)(Math.random()*100);
        int num=a+b;

            System.out.println("("+i+")"+a+"+"+b+"=?");
            System.out.println("算吧");
            int c=scan.nextInt();
            if(c==num){
                System.out.println("答对了");
                aa+=10;
            }else{
                System.out.println("答错了");
            }
        }

        System.out.println("你的成绩为："+aa);
    }
}
